#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Created by master on 2017/3/11
import MySQLdb

conn = MySQLdb.connect(host='127.0.0.1', user='root', passwd='123456', db='s12day9')

cur = conn.cursor()

li = [
    ('alex', 'usa'),
    ('sb', 'usa'),
]
reCount = cur.executemany('insert into UserInfo(Name,Address) values(%s,%s)', li)

conn.commit()
cur.close()
conn.close()

print(reCount)
